﻿$(function () {
    SetCalcValue()
});
$(window).resize(function () {
    SetCalcValue()
});
function SetCalcValue() {
    $("[data-calc-height]").each(function () {
        var k = $(this),
        m = k.parent(),
        f = k.attr("data-calc-height");
        k.height(GetCalcValue(f, m.height()))
    });
    $("[data-calc-width]").each(function () {
        var k = $(this),
        m = k.parent(),
        f = k.attr("data-calc-width");
        k.width(GetCalcValue(f, m.width()))
    });
    $("[data-calc-left]").each(function () {
        var k = $(this),
        m = k.parent(),
        f = k.attr("data-calc-left");
        k.css("left", GetCalcValue(f, m.width()) + "px")
    })
}
function GetCalcValue(k, m) {
    var f = k.split("-");
    return .01 * m * parseInt(f[0].replace("%")) - parseFloat(f[1])
}
window.Util || (window.Util = {});
window.Util.MD5 || (window.Util.MD5 = function (k) {
    function m(a) {
        str = "";
        for (j = 0; 3 >= j; j++) str += "0123456789abcdef".charAt(a >> 8 * j + 4 & 15) + "0123456789abcdef".charAt(a >> 8 * j & 15);
        return str
    }
    function f(a, b) {
        var c = (a & 65535) + (b & 65535);
        return (a >> 16) + (b >> 16) + (c >> 16) << 16 | c & 65535
    }
    function g(a, b, c, d, g, e) {
        a = f(f(b, a), f(d, e));
        return f(a << g | a >>> 32 - g, c)
    }
    function e(a, b, c, d, e, f, h) {
        return g(b & c | ~b & d, a, b, e, f, h)
    }
    function h(a, b, c, d, e, f, h) {
        return g(b & d | c & ~d, a, b, e, f, h)
    }
    function l(a, b, c, d, e, f, h) {
        return g(c ^ (b | ~d), a, b, e, f, h)
    }
    return function (a) {
        nblk = (a.length + 8 >> 6) + 1;
        blks = Array(16 * nblk);
        for (i = 0; i < 16 * nblk; i++) blks[i] = 0;
        for (i = 0; i < a.length; i++) blks[i >> 2] |= a.charCodeAt(i) << i % 4 * 8;
        blks[i >> 2] |= 128 << i % 4 * 8;
        blks[16 * nblk - 2] = 8 * a.length;
        x = blks;
        a = 1732584193;
        var b = -271733879,
        c = -1732584194,
        d = 271733878;
        for (i = 0; i < x.length; i += 16) {
            var k = a,
            n = b,
            p = c,
            q = d;
            a = e(a, b, c, d, x[i + 0], 7, -680876936);
            d = e(d, a, b, c, x[i + 1], 12, -389564586);
            c = e(c, d, a, b, x[i + 2], 17, 606105819);
            b = e(b, c, d, a, x[i + 3], 22, -1044525330);
            a = e(a, b, c, d, x[i + 4], 7, -176418897);
            d = e(d, a, b, c, x[i + 5], 12, 1200080426);
            c = e(c, d, a, b, x[i + 6], 17, -1473231341);
            b = e(b, c, d, a, x[i + 7], 22, -45705983);
            a = e(a, b, c, d, x[i + 8], 7, 1770035416);
            d = e(d, a, b, c, x[i + 9], 12, -1958414417);
            c = e(c, d, a, b, x[i + 10], 17, -42063);
            b = e(b, c, d, a, x[i + 11], 22, -1990404162);
            a = e(a, b, c, d, x[i + 12], 7, 1804603682);
            d = e(d, a, b, c, x[i + 13], 12, -40341101);
            c = e(c, d, a, b, x[i + 14], 17, -1502002290);
            b = e(b, c, d, a, x[i + 15], 22, 1236535329);
            a = h(a, b, c, d, x[i + 1], 5, -165796510);
            d = h(d, a, b, c, x[i + 6], 9, -1069501632);
            c = h(c, d, a, b, x[i + 11], 14, 643717713);
            b = h(b, c, d, a, x[i + 0], 20, -373897302);
            a = h(a, b, c, d, x[i + 5], 5, -701558691);
            d = h(d, a, b, c, x[i + 10], 9, 38016083);
            c = h(c, d, a, b, x[i + 15], 14, -660478335);
            b = h(b, c, d, a, x[i + 4], 20, -405537848);
            a = h(a, b, c, d, x[i + 9], 5, 568446438);
            d = h(d, a, b, c, x[i + 14], 9, -1019803690);
            c = h(c, d, a, b, x[i + 3], 14, -187363961);
            b = h(b, c, d, a, x[i + 8], 20, 1163531501);
            a = h(a, b, c, d, x[i + 13], 5, -1444681467);
            d = h(d, a, b, c, x[i + 2], 9, -51403784);
            c = h(c, d, a, b, x[i + 7], 14, 1735328473);
            b = h(b, c, d, a, x[i + 12], 20, -1926607734);
            a = g(b ^ c ^ d, a, b, x[i + 5], 4, -378558);
            d = g(a ^ b ^ c, d, a, x[i + 8], 11, -2022574463);
            c = g(d ^ a ^ b, c, d, x[i + 11], 16, 1839030562);
            b = g(c ^ d ^ a, b, c, x[i + 14], 23, -35309556);
            a = g(b ^ c ^ d, a, b, x[i + 1], 4, -1530992060);
            d = g(a ^ b ^ c, d, a, x[i + 4], 11, 1272893353);
            c = g(d ^ a ^ b, c, d, x[i + 7], 16, -155497632);
            b = g(c ^ d ^ a, b, c, x[i + 10], 23, -1094730640);
            a = g(b ^ c ^ d, a, b, x[i + 13], 4, 681279174);
            d = g(a ^ b ^ c, d, a, x[i + 0], 11, -358537222);
            c = g(d ^ a ^ b, c, d, x[i + 3], 16, -722521979);
            b = g(c ^ d ^ a, b, c, x[i + 6], 23, 76029189);
            a = g(b ^ c ^ d, a, b, x[i + 9], 4, -640364487);
            d = g(a ^ b ^ c, d, a, x[i + 12], 11, -421815835);
            c = g(d ^ a ^ b, c, d, x[i + 15], 16, 530742520);
            b = g(c ^ d ^ a, b, c, x[i + 2], 23, -995338651);
            a = l(a, b, c, d, x[i + 0], 6, -198630844);
            d = l(d, a, b, c, x[i + 7], 10, 1126891415);
            c = l(c, d, a, b, x[i + 14], 15, -1416354905);
            b = l(b, c, d, a, x[i + 5], 21, -57434055);
            a = l(a, b, c, d, x[i + 12], 6, 1700485571);
            d = l(d, a, b, c, x[i + 3], 10, -1894986606);
            c = l(c, d, a, b, x[i + 10], 15, -1051523);
            b = l(b, c, d, a, x[i + 1], 21, -2054922799);
            a = l(a, b, c, d, x[i + 8], 6, 1873313359);
            d = l(d, a, b, c, x[i + 15], 10, -30611744);
            c = l(c, d, a, b, x[i + 6], 15, -1560198380);
            b = l(b, c, d, a, x[i + 13], 21, 1309151649);
            a = l(a, b, c, d, x[i + 4], 6, -145523070);
            d = l(d, a, b, c, x[i + 11], 10, -1120210379);
            c = l(c, d, a, b, x[i + 2], 15, 718787259);
            b = l(b, c, d, a, x[i + 9], 21, -343485551);
            a = f(a, k);
            b = f(b, n);
            c = f(c, p);
            d = f(d, q)
        }
        return m(a) + m(b) + m(c) + m(d)
    }(k)
});